/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package flightlifter;

import GUI.GUIComponent;
import java.util.Vector;

/**
 *
 * @author Matt
 */
public abstract class WiringNode extends GUIComponent implements Selectable {


    TrueTypeFont font;

    boolean finished = false;
    protected int selected;

    Vector<Selectable> selectSet;

    public void invalidate() {
        finished = false;
    }

    public void setSelected(int selected) {
        this.selected = selected;
    }

    public int getSelected() {
        return selected;
    }

    public abstract void evaluate();


    public abstract String pickle( Vector<Node> nodes,
            Vector <Node> constraints,
            Vector <WiringNode> wiring);

    public PVector getCentroid(){
         return new PVector(locX, locY, 0);
    }

    public PVector getScreenSpaceCentroid() {
        return new PVector(locX, locY, 0);
    }

        public int mousePressed(int mouseX, int mouseY) {


        //check if mouse pressed on this object
        if (mouseX > locX && mouseX < locX + cWidth) {
            if (mouseY < locY + cHeight && mouseY > locY) {
      
                selectSet.add(this);
                return 1;
            }

        }
        return 0;
    }


}
